package com.lechi.web.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 设备传感器数据 IotSensorRecordBo
 *
 * @author yangguang
 */
@Data
public class IotSensorRecordBo {

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 设备序列号
     */
    private Long deviceId;

    /**
     * 文件名称
     */

    private String filename;

    /**
     * 文件路径
     */
    private String filepath;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
     * Gets params.
     *
     * @return the params
     */
    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    /**
     * Sets params.
     *
     * @param params the params
     */
    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
}
